import { S } from '../../s';
import { IPSAppViewMsgGroup } from './ipsapp-view-msg-group';
import { IPSAppViewMsgGroupDetail } from './ipsapp-view-msg-group-detail';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSAppViewMsgGroupImpl
  extends PSModelObjectImpl
  implements IPSAppViewMsgGroup
{
  get bodyStyle(): 'LIST' | 'MARQUEE' | 'MARQUEE2' | 'USER' | 'USER2' {
    return this.M.bodyStyle;
  }

  get bottomStyle(): 'LIST' | 'MARQUEE' | 'MARQUEE2' | 'USER' | 'USER2' {
    return this.M.bottomStyle;
  }

  get codeName(): string {
    return this.M.codeName;
  }

  protected psappviewmsggroupdetails: IPSAppViewMsgGroupDetail[];
  getPSAppViewMsgGroupDetails(): IPSAppViewMsgGroupDetail[] | null {
    return (
      this.psappviewmsggroupdetails ||
      (this.psappviewmsggroupdetails = this.fillChildListModel(
        this.M.getPSAppViewMsgGroupDetails,
        S._84,
      ) as IPSAppViewMsgGroupDetail[])
    );
  }

  findPSAppViewMsgGroupDetail(objKey: any): IPSAppViewMsgGroupDetail | null {
    return this.getPSModel5(
      S._84,
      this.getPSAppViewMsgGroupDetails(),
      objKey,
    ) as IPSAppViewMsgGroupDetail;
  }

  get topStyle(): 'LIST' | 'MARQUEE' | 'MARQUEE2' | 'USER' | 'USER2' {
    return this.M.topStyle;
  }
  get cls(): string {
    return 'PSAppViewMsgGroupImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._85) return true;
    return super.instanceof(cls);
  }
}
